package com.zkh.myutils.proxy.util;

import java.util.HashMap;
import java.util.Map;

/**
 * 基础类型返回值转换对象
 * @author zkh
 */
public class BaseTypeCastBean {
	//类型描述
	private String typeDesc;
	//基础类型对应的包装类名称
	private String typeName;
	//转换方法
	private String transMethod;
	//返回值描述
	private String returnDesc;
	//返回接收类型
	private int returnType;

	public BaseTypeCastBean(String typeDesc, String typeName, String transMethod, String returnDesc, int returnType) {
		super();
		this.typeDesc = typeDesc;
		this.typeName = typeName;
		this.transMethod = transMethod;
		this.returnDesc = returnDesc;
		this.returnType = returnType;
	}
	
	/**
	 * 获取一个Map容器
	 */
	public static Map<String, BaseTypeCastBean> getBaseTypeCastMap(BaseTypeCastBean... castBeans){
		//容器
		Map<String, BaseTypeCastBean> map = new HashMap<>();
		//装载数据
		for(BaseTypeCastBean b: castBeans) {
			map.put(b.getTypeDesc(), b);
		}
		//返回
		return map;
	}
	
	
	public String getTypeName() {
		return typeName;
	}
	public String getTypeDesc() {
		return typeDesc;
	}
	public void setTypeDesc(String typeDesc) {
		this.typeDesc = typeDesc;
	}
	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}
	public String getTransMethod() {
		return transMethod;
	}
	public void setTransMethod(String transMethod) {
		this.transMethod = transMethod;
	}
	public String getReturnDesc() {
		return returnDesc;
	}
	public void setReturnDesc(String returnDesc) {
		this.returnDesc = returnDesc;
	}
	public int getReturnType() {
		return returnType;
	}
	public void setReturnType(int returnType) {
		this.returnType = returnType;
	}
}
